﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace BaseData.Exts
{
    public class EnumsCMS
    {
        [Flags]
        public enum NodeType
        {
            Unknow = 0,
            Home = 1,
            Index = 2,
            Node = 3,
            List = 4,
            View = 5,
        }
        [Flags]
        public enum Type
        {
            ///<summary>
            ///所有类【默认】
            ///</summary>
            All = 0,
            ///<summary>
            ///文字类
            ///</summary>
            Text = 1,
            ///<summary>
            ///图片类
            ///</summary>
            Image = 2,
            ///<summary>
            ///媒体类
            ///</summary>
            Media = 4,
            ///<summary>
            ///文件类
            ///</summary>
            Zip = 8,
            ///<summary>
            ///文档类
            ///</summary>
            Doc = 16,
            ///<summary>
            ///宽屏大图类
            ///</summary>
            Banner = 32,
            ///<summary>
            ///导航图类
            ///</summary>
            Guide = 64,
            ///<summary>
            ///图标类
            ///</summary>
            Icon = 128,
        }
        [Flags]
        public enum Count
        {
            None = 0,
            Node = 1,
            Info = 2,
        }
        ///<summary>
        /// 数据：默认值是Node。值：Default | Node | List | Info。
        ///</summary>
        [Flags]
        public enum Data
        {
            Default = 0,
            Node = 1,
            List = 2,
            Info = 4,
        }
        ///<summary>
        /// 数据：默认值是Node。值：Default | Parent | Node | Info。
        ///</summary>
        [Flags]
        public enum Datax
        {
            Default = 0,
            ParentNode = 1,
            Node = 2,
            Info = 4,
        }
        ///<summary>
        /// 级别：默认是This。Default|This本级|Uppers所有上级|Upper上级|Lower下级|Lowers所有下级。
        ///</summary>
        [Flags]
        public enum Level
        {
            Default = 0,
            This = 1,
            Uppers = 2,
            Upper = 4,
            Lowers = 8,
            Lower = 16,
            Like = 32,
            Likes = 64,
            Near = 128,
        }
        [Flags]
        public enum Table
        {
            Default = 0,
            News = 1,
            Book = 2,
            Bbs = 4,
            Public = 8,
            Post = 16, // 评论【所有模块的节点和内容，均可评论，所以，此属性值为特殊值】
            Movie = 32,
            Download = 64,
            Product = 128,
            Mall = 256,
        }
        [Flags]
        public enum Limit
        {
            Default = 0,
            True = 1,
            False = 2,
        }
        [Flags]
        public enum Scope
        {
            Default = 0,
            True = 1,
            False = 2,
        }
        [Flags]
        public enum This
        {
            Default = 0,
            True = 1,
            False = 2,
        }
        /// <summary>
        /// 插件：默认为List。值：Default | List | Pager | Pages | Grid。
        /// </summary>
        [Flags]
        public enum Plug
        {
            Default = 0,
            List = 1,
            Pager = 2,
            Pages = 4,
            Grid = 8,
        }
        [Flags]
        public enum Sort
        {
            Default = 0,
            PkId = 1,
            NodeId = 2,
            SortId = 4,
            CreateDateTime = 8,
            PassDateTime = 16,
            ViewDateTime = 32,
            Click = 64,
        }
        [Flags]
        public enum IndexType
        {
            Empty = 1,
            Zero = 2,
            Value = 4,
            Values = 8,
        }
        [Flags]
        public enum FieldKeys // 枚举字段名称
        {
            None = 0,
            InfoPkId = 1,
            NodePkId = 2,
            ParentNodePkId = 4,
        }
        [Flags]
        public enum FieldKeyOrder // 枚举字段名称
        {
            // 主ID类
            InfoPkId,
            NodePkId,
            // 排序ID类
            SortId,
            // 点击类
            Click,
            ClickView,
            // 时间类
            DateTimeView,
            DateTimeCreate,
            DateTimeUpdate,
            DateTimePass,
            DateTimeOnline,
            DateTimeOffline,
        }
        [Flags]
        public enum FieldKeyValues // 枚举字段名称
        {
            // 主ID类
            InfoPkId,
            NodePkId,
            // 用户ID类
            CreateId,
            EditorId,
            UpdateId,
            PassId,
            // Flag类
            FlagPass,
            FlagStatus,
            FlagStop,
            FlagView,
            // 媒体类【不放在此】
            // 点击类
            Click,
            ClickView,
        }
        public enum FieldKeyDateTime
        {
            DateTimeView,
            DateTimeCreate,
            DateTimeUpdate,
            DateTimePass,
            DateTimeOnline,
            DateTimeOffline,
        }
        public enum FieldKeyString
        {
            Title,
            TitleSe,
            TitleShort,
            TitleExt,
            TitleEn,
            Content,
            ContentExt,
            Summary,
            Tag,
            KeyWord,
        }
        [Flags]
        public enum FieldKeyAll // 枚举字段名称
        {
            PkId = 1,
            ParentId = 2,
            NodeId = 3,
            SortId = 4,
            AccId = 5,
            AccIdType = 6,
            Title = 7,
            TitleSe = 8,
            TitleShort = 9,
            TitleExt = 10,
            TitleEn = 11,
            Content = 12,
            ContentExt = 13,
            Summary = 14,
            CssNames = 15,
            CssName = 16,
            Folder = 17,
            Href = 18,
            Url = 19,
            UrlEnable = 20,
            DateTimeView = 21,
            DateTimeCreate = 22,
            DateTimeUpdate = 23,
            DateTimePass = 24,
            DateTimeOnline = 25,
            DateTimeOffline = 26,
            CreateId = 27,
            EditorId = 28,
            UpdateId = 29,
            PassId = 30,
            Memo = 31,
            Message = 32,
            Remark = 33,
            Tag = 34,
            KeyWord = 35,
            TemplateIndex = 36,
            TemplateNode = 37,
            TemplateList = 38,
            TemplateView = 39,
            Key = 40,
            Keys = 41,
            Value = 42,
            Values = 43,
            Banner = 44,
            Banners = 45,
            Guide = 46,
            Guides = 47,
            Icon = 48,
            Icons = 49,
            Image = 50,
            Images = 51,
            ImageNew = 52,
            ImagesCount = 53,
            Click = 54,
            ClickView = 55,
            FlagMenu = 56,
            FlagView = 57,
            FlagStatus = 58,
            FlagPass = 59,
        }
        [Flags]
        public enum Source
        {
            Base = 1,
            Group = 2,
            Seek = 4,
        }
        [Flags]
        public enum FieldOrderAD // 枚举排序操作
        {
            DESC,
            ASC,
        }
        [Flags]
        public enum FieldAndOr // 枚举排序操作
        {
            And,
            Or,
        }
        [Flags]
        public enum FieldMethodAll
        {
            /// <summary>
            /// Int32
            /// </summary>
            [Description("等于")]
            Equal,
            [Description("不等于")]
            NotEqual,
            [Description("大于")]
            Great,
            [Description("不大于")]
            NotGreat,
            [Description("小于")]
            Less,
            [Description("不小于")]
            NotLess,
            /// <summary>
            /// String
            /// </summary>
            [Description("开始于")]
            StartsWith,
            [Description("结束于")]
            EndsWith,
            [Description("包含")]
            Contains
        }
        public enum FieldMethodValues
        {
            /// <summary>
            /// Int32、Float、DataTime
            /// </summary>
            [Description("等于")]
            Equal,
            [Description("不等于")]
            NotEqual,
            [Description("大于")]
            Great,
            [Description("不大于")]
            NotGreat,
            [Description("小于")]
            Less,
            [Description("不小于")]
            NotLess,
        }
        public enum FieldMethodString
        {
            [Description("等于")]
            Equal,
            [Description("不等于")]
            NotEqual,
            [Description("包含")]
            Contains,
            [Description("不包含")]
            NotContains,
            [Description("开始于")]
            StartsWith,
            [Description("不开始于")]
            NotStartsWith,
            [Description("结束于")]
            EndsWith,
            [Description("不结束于")]
            NotEndsWith,
        }
    }
}
